/**
 * Created by tongjunshui on 17/6/9.
 */
var express = require('express');
var router = express.Router();

var moment = require('moment');

var smsPin = require('./smsPin.js');

//smsPin('13370146432',function(err){
//    console.log('test');
//});

router.get('/sendSms',function(req, res){

   var phone =  req.query.phone || '';
    smsPin(phone,function(err){
        if(err){
            res.send({result:'error',message:err})
        }else{
            res.send({result:'success'})
        }
    });

})

module.exports = router;